package com.broad.school_description.dao;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface GetUrl {
    @Select("select url from url_index where id=#{id}")
    public String getUrl(@Param("id") Integer id);

    @Select("<script> select url from url_index where id in " +
            " <foreach collection='list' item='id' open='(' separator=',' close=')'> #{id} </foreach> </script>")
    public List<String> getUrl2(List<Integer> list);
}
